1. Field of the Invention
The present invention relates to an angle sensor and an angle sensor system for generating a detected angle value having a correspondence with an angle to be detected, and to a correction method for correcting an error of the angle sensor.
2. Description of the Related Art
In recent years, angle sensors have been widely used in various applications, such as detection of the rotational position of a steering wheel or a power steering motor in an automobile. The angle sensors generate a detected angle value having a correspondence with an angle to be detected. Examples of the angle sensors include a magnetic angle sensor. A system using the magnetic angle sensor is typically provided with a magnetic field generation unit for generating a rotating magnetic field whose direction rotates in response to the rotation or linear movement of an object. The magnetic field generation unit is a magnet, for example. The angle to be detected by the magnetic angle sensor is, for example, the angle that the direction of the rotating magnetic field in a reference position forms with respect to a reference direction.
Among known magnetic angle sensors is one that includes a detection signal generation unit for generating first and second detection signals 90° different in phase from each other and generates the detected angle value by performing an operation using the first and second detection signals. The detection signal generation unit includes a first detection circuit for outputting the first detection signal, and a second detection circuit for outputting the second detection signal. Each of the first and second detection circuits includes at least one magnetic detection element. The magnetic detection element includes, for example, a spin-valve magnetoresistance (MR) element including a magnetization pinned layer whose magnetization direction is pinned, a free layer whose magnetization direction varies depending on the direction of the rotating magnetic field, and a nonmagnetic layer located between the magnetization pinned layer and the free layer.
For the magnetic angle sensors, ideally, the first and second detection signals each have a waveform of a sinusoidal curve (including a sine waveform and a cosine waveform) when the direction of the rotating magnetic field changes with a constant angular velocity and the angle to he detected varies with a predetermined period. However, there are cases where the waveform of each detection signal is distorted from a sinusoidal curve. In such cases, the first detection signal contains a first ideal component which varies in such a manner as to trace an ideal sinusoidal curve and an error component other than the first ideal component, and the second detection signal contains a second ideal component which varies in such a manner as to trace an ideal sinusoidal curve and an error component other than the second ideal component. A distortion of the waveform of each detection signal may result in some error in the detected angle value. The error occurring in the detected angle value will hereinafter be referred to as angular error.
JP 2008-043183 A describes a technique to apply offset correction and gain correction to output signals of a magnetic sensor.
In the angle sensors, general correction such as offset correction and gain correction is conventionally applied to each detection signal. However, when each detection signal in the angle sensor has a distorted waveform, an angular error may occur even with the application of the aforementioned general correction. When the angle to be detected varies with a predetermined period, the angular error includes, for example, an error that varies with the same period as the predetermined period, and an error that varies with a period of ½ the predetermined period. Hereinafter, the former error will be referred to as the first-order error, and the latter as the second-order error.
To reduce the first-order error and the second-order error in the angle sensor, a method is conceivable in which each detection signal is corrected so as to have a less distorted waveform. Disadvantageously, however, such a method involves complicated operation.